package com.software.seakdream.service;

import com.software.seakdream.entity.Exchange;
import com.software.seakdream.repository.ExchangeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExchangeImpl implements ExchangeService{
    @Autowired
    private ExchangeRepository exchangeRepository;
    @Override
    public Integer findBonusByExchangeId(Integer exchangeId) {
        Integer bonus = exchangeRepository.findBonusByExchangeId(exchangeId);
        return bonus;
    }

    @Override
    public List<Exchange> findAllExchange() {
        List<Exchange> list = exchangeRepository.findAllExchange();
        return list;
    }
}
